--- title: "2598. Smallest Missing Non-negative Integer After Operations" created: 2025-12-17 --- # 2598. Smallest Missing Non-negative Integer After Operations ## 题目 [**2598. Smallest Missing Non-negative Integer After Operations**](https://leetcode.com/problems/smallest-missing-non-negative-integer-after-operations/) ![[image-42b686aa.png]] ## 思路分析 ![[image-03fa49dc.png]] ## 代码实现 ```java class Solution { public int findSmallestInteger(int[] nums, int value) { int[] count = new int[value]; for(int num:nums){ int rem = (num % value + value) % value; count[rem]++; } for(int i = 0;i0){ count[targetRem]--; }else{ return i; } } return nums.length; } } ``` ## 同类题型 ## 视频讲解